From 854d422940120087bd35da3251de3817cbac4b92 Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Thu, 11 Aug 2005 19:25:53 +0000 Subject: [PATCH] Fixed (new) segfault. --- xmltag.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xmltag.c b/xmltag.c index e044c3a68..992ec4871 100644 --- a/xmltag.c +++ b/xmltag.c @@ -63,6 +63,11 @@ void copy_xml_tag( xml_tag **copy, xml_tag *src, xml_tag *parent ) { char **ap = NULL; char **ap2 = NULL; int count = 0; + + if ( !src ) { + *copy = NULL; + return; + } res = xcalloc( 1, sizeof(xml_tag)); *copy = res; -- 2.30.2